<template>
  <div>
<el-breadcrumb separator-class="el-icon-arrow-right">
  <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
  <el-breadcrumb-item>管理权限</el-breadcrumb-item>
  <el-breadcrumb-item>角色列表</el-breadcrumb-item>
</el-breadcrumb>
<el-card>
    <el-button type="danger">添加人员</el-button>
   <tree-table
      ref="table"
      sum-text="sum"
      index-text="#"
      :data="data"
      :columns="columns"
      :stripe="props.stripe"
      :border="props.border"
      :show-header="props.showHeader"
      :show-summary="props.showSummary"
      :show-row-hover="props.showRowHover"
      :show-index="props.showIndex"
      :tree-type="props.treeType"
      :is-fold="props.isFold"
      :expand-type="props.expandType"
      :selection-type="props.selectionType">
      <template slot="$expand" scope="scope">
        {{ `My name is ${scope.row.name},
           this rowIndex is ${scope.rowIndex}.`
         }}
      </template>
      <template slot="likes" scope="scope">
        {{ scope.row.likes.join(',') }}
      </template>
    </tree-table>
</el-card>
      
  </div>
</template>

<script>
export default {
    data() {
        return {
            getList:{
                type:3,
                 pagenum:1,
                 pagesize:5,
                 total:0   
            },
            goodsList:[]
        }
    },
    methods: {
           async getgoodsList(){
               const {data:res}=await this.$http.get('categories',{params:this.getList})
               console.log(res);
               this.goodsList=res.data.result
               this.total=res.data.total

            }
    },
    mounted(){
        this.getgoodsList()
    }
}
</script>

<style>

</style>